package customerEnter.Frame.zookeeper;

import static com.google.common.collect.Maps.newHashMap;

import java.io.IOException;
import java.util.Map;

import com.alibaba.fastjson.JSON;

public class CopyOfZookeeperClient {

	@SuppressWarnings("unchecked")
	public static void main(String[] args) throws IOException,   InterruptedException {

//		ZooKeeper zooKeeper = new ZooKeeper("192.168.3.47:2181", 3000, new Watcher() {
//			@Override
//			public void process(WatchedEvent watchedevent) {
//				System.out.println(watchedevent.getWrapper().toString());
//			}
//		});
//
//		System.out.println("OK!");
//		Map<String, String> map = newHashMap();
//		map.put("userName", "mbuydata_sa");
//		String str = new String(zooKeeper.getData("/projectConf", false, null));
//		Map<String, String> map2 = JSON.parseObject(str, Map.class);
//
//		System.out.println(map2);
//		// zooKeeper.create("/projectConf", map.toString().getBytes(),
//		// Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
//		// zooKeeper.setData("/projectConf", JSON.toJSONString(map).getBytes(),
//		// -1);
//		Thread.sleep(10000);
//		zooKeeper.close();
	}

}
